package com.alexsh.domain;

import java.util.Date;
import java.util.Random;

/**
 * @author Alexander Shmygin <AShmygin@luxoft.com>
 * @version 1.0
 */
public class Book {
    private String id;
    private String title;
    private String authors;
    private Date pubDate;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        if (id == null || ("").equals(id)) {
            this.id = String.valueOf(new Random().nextInt(100000));
        } else {
            this.id = id;
        }
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthors() {
        return authors;
    }

    public void setAuthors(String authors) {
        this.authors = authors;
    }

    public Date getPubDate() {
        return pubDate;
    }

    public void setPubDate(Date pubDate) {
        this.pubDate = pubDate;
    }
}
